﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:WinRTXamlToolkit.Debugging.Controls">
    <Style
        TargetType="controls:EditableListBox">
        <Setter
            Property="Foreground"
            Value="{StaticResource ListBoxForegroundThemeBrush}" />
        <Setter
            Property="Background"
            Value="White" />
        <Setter
            Property="BorderBrush"
            Value="{StaticResource ListBoxBorderThemeBrush}" />
        <Setter
            Property="BorderThickness"
            Value="{StaticResource ListBoxBorderThemeThickness}" />
        <Setter
            Property="ScrollViewer.HorizontalScrollBarVisibility"
            Value="Disabled" />
        <Setter
            Property="ScrollViewer.VerticalScrollBarVisibility"
            Value="Auto" />
        <Setter
            Property="ScrollViewer.HorizontalScrollMode"
            Value="Disabled" />
        <Setter
            Property="ScrollViewer.IsHorizontalRailEnabled"
            Value="True" />
        <Setter
            Property="ScrollViewer.VerticalScrollMode"
            Value="Enabled" />
        <Setter
            Property="ScrollViewer.IsVerticalRailEnabled"
            Value="True" />
        <Setter
            Property="ScrollViewer.ZoomMode"
            Value="Disabled" />
        <Setter
            Property="ScrollViewer.IsDeferredScrollingEnabled"
            Value="False" />
        <Setter
            Property="ScrollViewer.BringIntoViewOnFocusChange"
            Value="True" />
        <Setter
            Property="IsTabStop"
            Value="False" />
        <Setter
            Property="TabNavigation"
            Value="Once" />
        <Setter
            Property="FontFamily"
            Value="{StaticResource ContentControlThemeFontFamily}" />
        <Setter
            Property="FontSize"
            Value="12" />
        <!--<Setter
            Property="ItemContainerTransitions">
            <Setter.Value>
                <TransitionCollection>
                    <RepositionThemeTransition />
                </TransitionCollection>
            </Setter.Value>
        </Setter>-->
        <Setter
            Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <VirtualizingStackPanel />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter
            Property="Template">
            <Setter.Value>
                <ControlTemplate
                    TargetType="controls:EditableListBox">
                    <Border
                        x:Name="LayoutRoot"
                        BorderBrush="{TemplateBinding BorderBrush}"
                        BorderThickness="{TemplateBinding BorderThickness}"
                        Background="{TemplateBinding Background}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup
                                x:Name="CommonStates">
                                <VisualState
                                    x:Name="Normal" />
                                <VisualState
                                    x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetProperty="Background"
                                            Storyboard.TargetName="LayoutRoot">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="Transparent" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetProperty="BorderBrush"
                                            Storyboard.TargetName="LayoutRoot">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource ListBoxDisabledForegroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup
                                x:Name="FocusStates">
                                <VisualState
                                    x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames
                                            Storyboard.TargetProperty="Background"
                                            Storyboard.TargetName="LayoutRoot">
                                            <DiscreteObjectKeyFrame
                                                KeyTime="0"
                                                Value="{StaticResource ListBoxFocusBackgroundThemeBrush}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState
                                    x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <ScrollViewer
                            x:Name="ScrollViewer"
                            BringIntoViewOnFocusChange="{TemplateBinding ScrollViewer.BringIntoViewOnFocusChange}"
                            HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
                            HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                            IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
                            IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
                            IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
                            Padding="{TemplateBinding Padding}"
                            TabNavigation="{TemplateBinding TabNavigation}"
                            VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                            VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
                            ZoomMode="{TemplateBinding ScrollViewer.ZoomMode}">
                            <ItemsPresenter />
                        </ScrollViewer>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>